package com.daydayup.learn.aop;

public class PayProxy implements PayService{

    private PayService payService;

    public PayProxy(PayService payService) {
        this.payService = payService;
    }

    public void before()
    {
        System.out.println("before  --------");
    }

    public void after(){
        System.out.println("after  --------");
    }
    @Override
    public void pay() {
        before();
        payService.pay();
        after();
    }
}
